<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>表单选择器-应用实例</title>
  <script type="text/javascript" src="./script/jquery-3.6.0.min.js"></script>
  <script type="text/javascript">
  $(function () {
    var $button = $(":button");
    alert("$button的个数"+$button.length)

    var $button2 = $("input[type='button']");
    alert("$button2的个数"+$button2.length)

    var $button3 = $("button");
    alert("$button3的个数"+$button3.length)
  })
  </script>
</head>
<body>
<form>
  <input type="text"/><br/>
  <input type="checkbox"/><br/>
  <input type="radio"/><br/>
  <input type="image" src="../image/2.png" height="100"/><br/>
  <input type="file"/><br/>
  <input type="submit"/><br/>
  <input type="reset"/><br/>
  <input type="password"/><br/>
  <input type="button" value="按钮 1"/><br/>
  <select>
    <option/>
  </select><br/>
  <textarea></textarea><br/>
  <button>按钮 2</button>
  <button>按钮 3</button>
  <br/>
</form>
</body>
</html>